import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        if(n==1){
            System.out.println(1);
        }else if(n==2){
            System.out.println(2);
        }else{
            int[] dp=new int[n];
            dp[0]=1;
            dp[1]=2;
            for(int i=2;i<n;i++){
                dp[i]=dp[i-1]+dp[i-2];
            }
            System.out.println(dp[n-1]);
        }
    }
    public static void main1(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.nextLine();
        StringBuilder s=new StringBuilder();
        int i=str.length()-1;
        int count=0;
        while(true){
            s.append(str.charAt(i));
            count++;
            i--;
            if(i<0){
                break;
            }
            if(count==3){
                s.append(",");
                count=0;
            }
        }
        s.reverse();
        System.out.println(s.toString());
    }
}